package com.aaa.repast.web.page;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.io.Serializable;
import java.util.List;
import java.util.Objects;

//import lombok.Data;

/**
 * 表格分页数据对象
 * 
 * @author teacherChen
 */
//@Data
@ApiModel(description ="返回结果" )
public class TableDataInfo implements Serializable
{
    private static final long serialVersionUID = 1L;
    /** 总记录数 */
    @ApiModelProperty(value = "返回总记录数")
    private long count;
    /** 列表数据 */
    @ApiModelProperty(value = "返回列表数据")
    private List<?> data;
    /** 消息状态码 */
    @ApiModelProperty(value = "返回消息状态码")
    private int code;
    @ApiModelProperty(value = "返回消息")
    private String msg;

    public static long getSerialVersionUID() {
        return serialVersionUID;
    }

    public long getCount() {
        return count;
    }

    public void setCount(long count) {
        this.count = count;
    }

    public List<?> getData() {
        return data;
    }

    public void setData(List<?> data) {
        this.data = data;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    @Override
    public String toString() {
        return "TableDataInfo{" +
                "count=" + count +
                ", data=" + data +
                ", code=" + code +
                ", msg='" + msg + '\'' +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        TableDataInfo that = (TableDataInfo) o;
        return count == that.count &&
                code == that.code &&
                Objects.equals(data, that.data) &&
                Objects.equals(msg, that.msg);
    }

    @Override
    public int hashCode() {
        return Objects.hash(count, data, code, msg);
    }


}
